<?php
declare(strict_types=1);

namespace App\Repository\Web;

use App\Repository\BaseRepository;
use App\Model\UserFollow;

class UserFollowsRepository extends BaseRepository {
    public function __construct(UserFollow $userFollow)
    {
        parent::__construct($userFollow);
    }

    public function findWithFollows($userId, $perPage, $page)
    {
        return $this->model->with(['follows'])->where('follower_id', $userId)->paginate($perPage, page: $page);
    }
    public function findWithfollowing($userId, $perPage, $page)
    {
        return $this->model->with(['follows'])->where('follower_id', $userId)->paginate($perPage, page: $page);
    }
}